From 1160db262121fbb75be7670e8ea84b631639f69f Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 11 Sep 2018 21:11:34 +0200 Subject: [PATCH] Limit parallel builds on Ubuntu Limit to 2 on amd64, arm64 and ppc64el (they go OOM). --- debian/rules | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/debian/rules b/debian/rules index 32b4fd97..c0391a1e 100755 --- a/debian/rules +++ b/debian/rules @@ -16,6 +16,18 @@ ifneq (,$(filter $(DEB_BUILD_ARCH),mips mipsel)) CXXFLAGS+=--param ggc-min-expand=20 endif +ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes) + ifeq ($(DEB_HOST_ARCH),amd64) + export DEB_BUILD_MAINT_OPTIONS=parallel=2 + endif + ifeq ($(DEB_HOST_ARCH),arm64) + export DEB_BUILD_MAINT_OPTIONS=parallel=2 + endif + ifeq ($(DEB_HOST_ARCH),ppc64el) + export DEB_BUILD_MAINT_OPTIONS=parallel=2 + endif +endif + BUILD_DOC = $(if $(shell dh_listpackages | grep libpcl-doc),-DWITH_DOCS=ON) # Multiarch. -- 2.30.2